Memory leaks occur in MATLAB when calling ActiveX functions with improper capitalization

Tech Note: TN0191
Product: ActiveX
Version: All
Date Added: 2005-07-28

Issue

When using ActiveX controls such as ReadTagV with MATLAB 6.5, calling the function with the characters readtagv (all lowercase) will cause a memory leak of 8 bytes per point returned. When using ActiveX controls such as GetTagVal with MATLAB 7.0, calling the function with the characters gettagval (all lowercase) will cause a memory leak of 40 bytes per function invocation.

Workaround

To avoid these leaks, make sure to call the functions exactly as designed (with the proper capitalization, e.g. ReadTagV and GetTagVal).